﻿using System;
using System.Collections.Generic;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using WeiboPlus.Models;
using WeiboPlus.Service;

namespace WeiboPlus.Renren
{
    public class RenrenMappingFactory : MappingFactoryBase
    {
        public RenrenMappingFactory(SNSAccount account)
            : base(account)
        {
 
        }

        protected override void RegisterMapping()
        {
            var statusMapping = new RenrenJTokenToStatusMapping(this);
            if (!_mappings.ContainsKey(statusMapping.IdentifyName))
                _mappings.Add(new KeyValuePair<string, IMapping>(statusMapping.IdentifyName, statusMapping));

            var userMapping = new RenrenJTokenToUserMapping(this);
            if (!_mappings.ContainsKey(userMapping.IdentifyName))
                _mappings.Add(new KeyValuePair<string, IMapping>(userMapping.IdentifyName, userMapping));

            //var commentMapping = new SinaJTokenToCommentMapping(this);
            //if (!_mappings.ContainsKey(commentMapping.IdentifyName))
            //    _mappings.Add(new KeyValuePair<string, IMapping>(commentMapping.IdentifyName, commentMapping));
        }
    }
}
